/* =========================================
   AGGARWAL PUBLIC SCHOOL - CONTACT PAGE
   Navy Blue | Sky Blue | Gold
========================================= */

:root {
    --house-primary: #0b2341;
    --house-primary-light: #123b68;
    --house-blue: #008fd4;
    --house-blue-light: #00b8ff;
    --house-gold: #c89b3c;
    --house-gold-light: #f1d17a;
    --house-text: #172033;
    --house-muted: #667085;
    --house-white: #ffffff;
    --house-light: #f5f8fc;
    --house-border: rgba(11, 35, 65, 0.09);
    --house-shadow-sm: 0 10px 30px rgba(11, 35, 65, 0.08);
    --house-shadow-md: 0 20px 50px rgba(11, 35, 65, 0.12);
    --house-shadow-lg: 0 30px 80px rgba(11, 35, 65, 0.17);
    --house-gradient: linear-gradient( 135deg, #0b2341 0%, #123b68 55%, #008fd4 100%);
    --house-radius: 18px;
    --house-transition: 0.35s ease;
}


/* =========================================
   BASE
========================================= */

.aps-contact,
.aps-contact * {
    box-sizing: border-box;
}

.aps-contact {
    width: 100%;
    overflow: hidden;
    background: var(--house-white);
    color: var(--house-text);
    font-family: inherit;
    line-height: 1.6;
}

.aps-contact img,
.aps-contact iframe {
    max-width: 100%;
}

.aps-contact a {
    text-decoration: none;
}

.aps-contact button,
.aps-contact input,
.aps-contact textarea {
    font-family: inherit;
}


/* =========================================
   HERO SECTION
========================================= */

.aps-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding: 85px 22px;
    text-align: center;
    color: var(--house-white);
    background: var(--house-gradient);
    animation: houseHeroEnter 0.8s ease both;
}

.aps-hero::before,
.aps-hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
    pointer-events: none;
}

.aps-hero::before {
    top: -180px;
    right: -80px;
    width: 390px;
    height: 390px;
    box-shadow: 0 0 0 35px rgba(255, 255, 255, 0.025), 0 0 0 70px rgba(255, 255, 255, 0.02);
    animation: houseOrbit 18s linear infinite;
}

.aps-hero::after {
    bottom: -190px;
    left: -80px;
    width: 330px;
    height: 330px;
    box-shadow: 0 0 0 35px rgba(255, 255, 255, 0.025), 0 0 0 70px rgba(255, 255, 255, 0.02);
}

.aps-hero>span {
    display: inline-block;
    color: var(--house-gold-light);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2.5px;
}

.aps-hero h1 {
    margin: 14px 0;
    color: var(--house-white);
    font-size: clamp(38px, 5vw, 66px);
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: -1.8px;
}

.aps-hero h1 b {
    color: var(--house-gold-light);
}

.aps-hero p {
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.85);
    font-size: 15px;
    line-height: 1.9;
}

.hero-line {
    width: 65px;
    height: 4px;
    margin: 26px auto 0;
    border-radius: 20px;
    background: var(--house-gold);
    box-shadow: 0 0 18px rgba(241, 209, 122, 0.35);
}


/* =========================================
   MAIN CONTAINER
========================================= */

.aps-main {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 82px 0;
}

.aps-heading {
    margin-bottom: 43px;
    text-align: center;
}

.aps-heading>span,
.aps-label {
    display: inline-block;
    color: var(--house-blue);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 2px;
}

.aps-heading h2 {
    margin: 12px 0;
    color: var(--house-primary);
    font-size: clamp(28px, 3.5vw, 42px);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.8px;
}

.aps-heading h2 b {
    color: var(--house-blue);
}

.aps-heading p {
    max-width: 600px;
    margin: 0 auto;
    color: var(--house-muted);
    font-size: 14px;
    line-height: 1.9;
}


/* =========================================
   GRID
========================================= */

.aps-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
    align-items: stretch;
    gap: 30px;
}

.aps-location,
.aps-form-card {
    min-width: 0;
    border: 1px solid var(--house-border);
    border-radius: var(--house-radius);
    background: var(--house-white);
    box-shadow: var(--house-shadow-sm);
    transition: box-shadow var(--house-transition), border-color var(--house-transition);
}

.aps-location:hover,
.aps-form-card:hover {
    border-color: rgba(0, 143, 212, 0.2);
    box-shadow: var(--house-shadow-md);
}


/* =========================================
   MAP
========================================= */

.aps-location {
    overflow: hidden;
}

.aps-map {
    position: relative;
    width: 100%;
    height: 320px;
    overflow: hidden;
    background: var(--house-light);
}

.aps-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    transition: transform 0.7s ease;
}

.aps-map:hover iframe {
    transform: scale(1.025);
}


/* =========================================
   LOCATION DETAILS
========================================= */

.aps-location-info {
    padding: 30px;
}

.aps-location-info h3,
.aps-form-card h3 {
    margin: 10px 0 24px;
    color: var(--house-primary);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.4;
}

.aps-detail {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin: 25px 0;
}

.aps-icon {
    display: grid;
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid rgba(0, 143, 212, 0.12);
    border-radius: 12px;
    background: #edf8ff;
    color: var(--house-blue);
    font-size: 22px;
    transition: color var(--house-transition), background var(--house-transition), transform var(--house-transition);
}

.aps-detail:hover .aps-icon {
    color: var(--house-white);
    background: var(--house-gradient);
    transform: translateY(-4px);
}

.aps-detail>div:last-child {
    min-width: 0;
}

.aps-detail h4 {
    margin: 0 0 6px;
    color: var(--house-primary);
    font-size: 14px;
    font-weight: 800;
}

.aps-detail p {
    margin: 0;
    color: var(--house-muted);
    font-size: 13px;
    line-height: 1.9;
    overflow-wrap: anywhere;
}

.aps-detail p a {
    color: var(--house-muted);
    transition: color var(--house-transition);
}

.aps-detail p a:hover {
    color: var(--house-blue);
}


/* =========================================
   DIRECTIONS BUTTON
========================================= */

.aps-directions {
    display: flex;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 26px;
    padding: 14px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--house-gradient);
    color: var(--house-white);
    font-size: 14px;
    font-weight: 750;
    transition: transform var(--house-transition), box-shadow var(--house-transition);
}

.aps-directions span {
    color: var(--house-gold-light);
    font-size: 21px;
    transition: transform var(--house-transition);
}

.aps-directions:hover {
    color: var(--house-white);
    transform: translateY(-3px);
    box-shadow: 0 12px 25px rgba(11, 35, 65, 0.18);
}

.aps-directions:hover span {
    transform: translate(3px, -3px);
}


/* =========================================
   FORM CARD
========================================= */

.aps-form-card {
    padding: 38px;
}

.aps-form-intro {
    margin: -12px 0 28px;
    color: var(--house-muted);
    font-size: 13px;
    line-height: 1.9;
}


/* Two fields in one row on desktop */

.aps-field-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px;
}

.aps-field {
    min-width: 0;
    margin-bottom: 22px;
}

.aps-field label {
    display: block;
    margin-bottom: 9px;
    color: var(--house-primary);
    font-size: 13px;
    font-weight: 750;
}

.aps-field input,
.aps-field textarea {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 14px 15px;
    border: 1px solid #dfe7f0;
    border-radius: 9px;
    outline: none;
    background: #f9fbfe;
    color: var(--house-text);
    font-size: 13px;
    line-height: 1.7;
    transition: border-color var(--house-transition), box-shadow var(--house-transition), background var(--house-transition);
}

.aps-field input {
    min-height: 51px;
}

.aps-field textarea {
    min-height: 155px;
    resize: vertical;
}

.aps-field input::placeholder,
.aps-field textarea::placeholder {
    color: #98a2b3;
    opacity: 1;
}

.aps-field input:hover,
.aps-field textarea:hover {
    border-color: #a8c9e3;
}

.aps-field input:focus,
.aps-field textarea:focus {
    border-color: var(--house-blue);
    background: var(--house-white);
    box-shadow: 0 0 0 4px rgba(0, 143, 212, 0.09);
}


/* =========================================
   SUBMIT BUTTON
========================================= */

#submitBtn {
    display: flex;
    width: 100%;
    min-height: 55px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 14px 20px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--house-gradient);
    color: var(--house-white);
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
    transition: transform var(--house-transition), box-shadow var(--house-transition), opacity var(--house-transition);
}

#submitBtn>span:last-child {
    color: var(--house-gold-light);
    font-size: 23px;
    transition: transform var(--house-transition);
}

#submitBtn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(11, 35, 65, 0.22);
}

#submitBtn:hover:not(:disabled)>span:last-child {
    transform: translateX(5px);
}

#submitBtn:focus-visible,
.aps-directions:focus-visible,
.aps-bottom>a:focus-visible {
    outline: 3px solid var(--house-gold);
    outline-offset: 4px;
}

#submitBtn:disabled {
    cursor: wait;
    opacity: 0.7;
}

#formStatus {
    margin-top: 15px;
    font-size: 13px;
    line-height: 1.8;
}

#formStatus.success {
    color: #16803c;
}

#formStatus.error {
    color: #b42318;
}

.aps-privacy {
    margin: 17px 0 0;
    color: var(--house-muted);
    font-size: 11px;
    line-height: 1.8;
    text-align: center;
}


/* =========================================
   BOTTOM CTA
========================================= */

.aps-bottom {
    display: flex;
    width: min(1180px, calc(100% - 48px));
    align-items: center;
    justify-content: space-between;
    gap: 25px;
    margin: 0 auto 80px;
    padding: 36px 40px;
    border: 1px solid rgba(200, 155, 60, 0.28);
    border-radius: 18px;
    background: radial-gradient( circle at 95% 10%, rgba(0, 143, 212, 0.07), transparent 32%), linear-gradient(120deg, #f5f8fc, #ffffff);
    box-shadow: var(--house-shadow-sm);
}

.aps-bottom>div {
    min-width: 0;
}

.aps-bottom>div>span {
    color: var(--house-blue);
    font-size: 10px;
    line-height: 1.8;
}

.aps-bottom h2 {
    margin: 9px 0;
    color: var(--house-primary);
    font-size: clamp(21px, 2.6vw, 30px);
    font-weight: 800;
    line-height: 1.4;
}

.aps-bottom p {
    margin: 0;
    color: var(--house-muted);
    font-size: 13px;
    line-height: 1.8;
}

.aps-bottom>a {
    display: inline-flex;
    flex-shrink: 0;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    padding: 13px 20px;
    border-radius: 9px;
    background: var(--house-primary);
    color: var(--house-white);
    font-size: 13px;
    font-weight: 750;
    transition: background var(--house-transition), transform var(--house-transition), box-shadow var(--house-transition);
}

.aps-bottom>a:hover {
    background: var(--house-blue);
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 143, 212, 0.18);
}


/* =========================================
   ENTRANCE ANIMATIONS
========================================= */

@keyframes houseHeroEnter {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes houseOrbit {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}


/* =========================================
   TABLET RESPONSIVE
========================================= */

@media (max-width: 1000px) {
    .aps-main {
        width: min(760px, calc(100% - 36px));
        padding: 65px 0;
    }
    .aps-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 25px;
    }
    .aps-map {
        height: 340px;
    }
    .aps-bottom {
        width: calc(100% - 36px);
        margin-bottom: 60px;
        padding: 30px;
    }
}


/* =========================================
   MOBILE RESPONSIVE
========================================= */

@media (max-width: 600px) {
    .aps-hero {
        padding: 55px 18px;
    }
    .aps-hero h1 {
        font-size: 39px;
        letter-spacing: -0.8px;
    }
    .aps-hero p {
        font-size: 13px;
    }
    .aps-hero::before {
        width: 250px;
        height: 250px;
    }
    .aps-hero::after {
        width: 210px;
        height: 210px;
    }
    .aps-main {
        width: calc(100% - 28px);
        padding: 46px 0 50px;
    }
    .aps-heading {
        margin-bottom: 28px;
    }
    .aps-heading h2 {
        font-size: 27px;
    }
    .aps-heading p {
        font-size: 13px;
    }
    .aps-grid {
        gap: 20px;
    }
    .aps-location,
    .aps-form-card {
        border-radius: 14px;
    }
    .aps-map {
        height: 255px;
    }
    .aps-location-info,
    .aps-form-card {
        padding: 23px 18px;
    }
    .aps-location-info h3,
    .aps-form-card h3 {
        font-size: 22px;
    }
    .aps-detail {
        gap: 11px;
        margin: 21px 0;
    }
    .aps-icon {
        flex-basis: 39px;
        width: 39px;
        height: 39px;
        font-size: 20px;
    }
    .aps-detail p {
        font-size: 12px;
    }
    .aps-field-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }
    .aps-field {
        margin-bottom: 19px;
    }
    .aps-field input {
        min-height: 49px;
    }
    .aps-field textarea {
        min-height: 135px;
    }
    .aps-bottom {
        width: calc(100% - 28px);
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        margin-bottom: 42px;
        padding: 25px 20px;
    }
    .aps-bottom h2 {
        font-size: 23px;
    }
    .aps-bottom>a {
        width: 100%;
        text-align: center;
    }
}


/* =========================================
   SMALL MOBILE
========================================= */

@media (max-width: 360px) {
    .aps-hero h1 {
        font-size: 33px;
    }
    .aps-main {
        width: calc(100% - 22px);
    }
    .aps-location-info,
    .aps-form-card {
        padding: 19px 14px;
    }
    .aps-heading h2 {
        font-size: 24px;
    }
    .aps-detail {
        gap: 9px;
    }
}


/* =========================================
   REDUCED MOTION ACCESSIBILITY
========================================= */

@media (prefers-reduced-motion: reduce) {
    .aps-contact *,
    .aps-contact *::before,
    .aps-contact *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}